package com.zhuiyun.project.api.poetryAuthor.service;

import com.zhuiyun.project.api.poetryAuthor.entity.PoetryAuthor;
import com.zhuiyun.project.api.poetryAuthor.model.PoetryAuthorModel;
import com.zhuiyun.project.common.errorCode.CommonException;
import com.zhuiyun.project.common.response.CommonResult;
import com.zhuiyun.project.utils.pageUtil.PageRequest;

public interface PoetryAuthorService {
    /**
     *
     * @Author shy
     * @Date 2023/12/11 13:45 TODO 查询作者
      * @param poetryAuthor
     * @return CommonResult
     */
    CommonResult ListAuthor(PoetryAuthorModel poetryAuthor, PageRequest pageRequest);
    /**
     *
     * @Author shy
     * @Date 2023/12/11 13:44 TODO 删除作者
      * @param id
     * @return CommonResult
     */
    CommonResult DeleteAuthor(Integer id);
    /**
     *
     * @Author shy
     * @Date 2023/12/11 13:44   TODO 添加作者
      * @param poetryAuthorModel
     * @return CommonResult
     */
    CommonResult InsertAuthor(PoetryAuthorModel poetryAuthorModel) throws CommonException;

    /**
     *
     * @Author shy
     * @Date 2023/12/11 13:44   TODO 修改作者信息
      * @param poetryAuthorModel
     * @return CommonResult
     */
    CommonResult UpdateAuthor(PoetryAuthorModel poetryAuthorModel) throws CommonException;

    /**
     *
     * @Author shy
     * @Date 2023/12/14 10:47 TODO 根据id查询作者
     * @param id
     * @return CommonResult
     */
    CommonResult getAuthorById(Integer id) throws CommonException;

    /**
     *
     * @Author shy
     * @Date 2023/12/14 10:48 TODO 查询所有作者
      * @param
     * @return CommonResult
     */
    CommonResult GetAllAuthor();

}
